package com.cl.erp_2301.Service.impl;

import com.cl.erp_2301.dto.GoodsDTO;
import com.cl.erp_2301.dto.SupplierDTO;
import com.cl.erp_2301.entity.Goods;
import com.cl.erp_2301.mapper.GoodsMapper;
import com.cl.erp_2301.Service.GoodsService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class GoodsServiceImpl implements GoodsService {
    @Resource
    private GoodsMapper goodsMapper;
    @Override
    public List<GoodsDTO> listByPage() {
        return goodsMapper.listByPage();
    }

    @Override
    public void add(GoodsDTO goodsDTO) {
        goodsMapper.add(goodsDTO);

    }

    @Override
    public void update(GoodsDTO goodsDTO) {
        goodsMapper.update(goodsDTO);
    }

    @Override
    public Goods goodstypelist(SupplierDTO supplierDTO) {
        return goodsMapper.goodstypelist(supplierDTO);
    }
}
